from django.contrib import admin
from store.models import *
# Register your models here.


class ProductStyleInline(admin.StackedInline):
    model = ProductStyle
    extra = 0

class ProductPicleInline(admin.StackedInline):
    model = ProductPic
    extra = 0


admin.site.register(Category)
admin.site.register(ShopCart)
admin.site.register(ShopOrder)
@admin.register(Product)
class ProductAdmin(admin.ModelAdmin):
    list_filter = ('gender','type','category')
    list_display = ('gender','type','category','title','price','sales_price',)
    search_fields = ('title',)

    inlines = [ProductStyleInline,ProductPicleInline]


